import time

from base.base import Base
from utils.generate_logs_util import get_log
logger = get_log(__name__)

# ----------------权限管理----------------

class page_permissions_manage(Base):



    # 点击权限管理
    def permission_management_click(self,permission_name,permission_id,permissions_description,permission_id1):
        self.switch_node('permissions_manages')
        self.click('permission_manage')
        logger.info("点击权限管理")

    # 点击添加权限
        self.click('add_permissions')
        logger.info("点击添加权限")
    # 输入权限名称
        self.send_keys('permission_name',permission_name)
        logger.info("输入权限名称")
    # 输入权限标识
        self.send_keys('permission_identification',permission_id)
        logger.info("输入权限标识")
    # 输入权限描述
        self.send_keys('permissions_description',permissions_description)
        logger.info("输入权限描述")
    # 点击保存按钮
        self.click('save_button')
        logger.info("点击保存按钮")

        self.click('permissions_submit')
    # 点击权限管理
        self.click('permission_manage')
        logger.info("点击权限管理")
    # 输入权限标识
        self.send_keys('accurate_query',permission_id1)
        logger.info("输入权限标识")

    # 点击查询按钮
        self.click('query_button')
        logger.info("点击查询按钮")


